//
//  MyDataManager.h
//  unity-plugin
//
//  Created by hsy on 2018/10/17.
//
//

// {"data":"xxxx","msg":"登录成功","ret":1001}
// 参数说明
// data:具体的内容
// msg: 操作成功/失败返回的内容
// ret：错误码

#import <gamesdkFramework/LoginAPI.h>

#define PAY_RESULT @"PayResult"
#define CHECK_PAY_RESULT @"CheckPayResult"
#define LOGIN_RESULT @"LoginResult"
#define SYNC_RESULT @"SyncInfoResult"

typedef NS_ENUM(NSInteger, SDKResult) {
    LOGIN_SUCCESS = 1001,//登录成功
    LOGIN_FAIL, //登录失败 1002
    LOGOUT,//退出登录 1003
    PAY_SUCCESS,//支付成功 1004
    PAY_FAIL,//支付失败 1005
    CHECK_PAY_SUCCESS,//检查支付 1006
    CHECK_PAY_FAIL,//检查支付失败 1007
    SYNC_INFO_SUCCESS,//同步信息成功 1008
    SYNC_INFO_FAIL//同步信息失败 1009    
};

@interface GameSDKApi : NSObject

@property (strong, nonatomic) NSString * loginObject;
@property (nonatomic, strong) LoginAPI *loginAPI;

+ (GameSDKApi*) shareInstance;

- (void)callBackUnity:(NSString*)obj method:(NSString*)method msg:(NSString*)msg;

- (void) login;

- (void) gameLogout;

- (void) setOnLoginListener:(NSString*)gameObject;

- (void) logout;

- (void) pay:(NSString*)payJson gameObject:(NSString*)gameObject;

- (void) checkPay:(NSString*)gameObject;

- (void) syncData:(NSString*)dataJson gameObject:(NSString*)gameObject;

- (void) exitGame;

@end
